package com.qf.service;

import com.qf.entity.Product;
import com.qf.entity.Shop;
import com.qf.entity.User;
import com.qf.entity.custom.ShopCustom;

import java.util.Date;
import java.util.List;

/**
 * @ProjectName: Dessert-Shop
 * @Package: com.qf.service
 * @ClassName: ShopService
 * @Author: 29284
 * @Description: 店铺
 * @Date: 2020/7/26 19:16
 * @Version: 1.0
 */
public interface ShopService {

    /**
     *
     * 店铺登录 根据shopLogin和shopPwd查询
     *
     * @param shopLogin 对应shop实体中的shopLogin
     * @param shopPwd 对应shop实体中的shopPwd
     *
     * @return 返回一个user实体类型数据
     */
    Shop login(String shopLogin, String shopPwd);

    public Boolean register(Shop shop);


    /**
     * 后台根据店铺查商品
     * @param shopId
     * @return
     */
    public List<ShopCustom> getShopProductByShopId(int shopId);

    /**
     * 改
     * @param product
     * @return
     */
    public boolean modifyShopProductByShopId(Product product);

    /**
     * 删
     * @param product
     * @return
     */
    public boolean deleteShopProductByShopId(Product product);

    /**
     * 后台根据id和标题查
     * @param shopId
     * @param productName
     * @return
     */
    public List<ShopCustom> getShopProductByTitle(int shopId,String productName);

    /**
     * 后台根据id和类型查
     * @param shopId
     * @param productType
     * @return
     */
    public List<ShopCustom> getShopProductByType(int shopId,String productType);

    /**
     * 获取店铺信息
     * @param shopId 店铺id
     * @return 返回店铺实体类
     */
    public Shop getShopById(int shopId);

    /**
     * 改店铺信息
     * @param shop
     * @return
     */
    public boolean modifyShopById(Shop shop);

    public int getUserShopCount(int shopId);

    public int getUserShopCountIsNew(int shopId, Date createtime);
}
